import os
import pandas as pd
import matplotlib.pyplot as plt

os.chdir('PATH')

ww=pd.read_csv('Data_extended2a.csv',index_col=0) # Wildfire optimized fastSIR simulation result
WEMM = pd.read_csv('Data_Fig2c_1.csv', index_col=0) # Wildfire data with negative sentiment and network information

WEmp_data = WEMM[70:]
WEmp_data['Count'] = WEmp_data['Count'] - WEmp_data['Count'][70]
WEmp_data = WEmp_data.reset_index(drop=True)


plt.rcParams['font.size'] = 14
plt.figure(dpi=400,figsize=(10,4.8))
xx = 194
plt.fill_between(range(0,xx,1), ww['bR'][:xx]/4592*100,ww['tR'][:xx]/4592*100,facecolor='red',interpolate=True
                 , alpha = 0.3)
plt.plot(range(0,xx,1), ww['mR'][:xx]/4592*100, color='red',label='fastSIR')
plt.plot(range(0,xx,1), WEmp_data[:xx].Count/4592*100, color='black',linestyle='-',label='Twitter')
plt.axvline(x=45,color='gray',linestyle='--')
plt.axvline(x=60,color='gray',linestyle='--')
plt.text(46,71,'t=45')
plt.text(61,61,'t=60')
plt.axhline(y=0.00,color='black',linestyle=':')
plt.axhline(y=10,color='black',linestyle=':')
plt.axhline(y=20,color='black',linestyle=':')
plt.axhline(y=30,color='black',linestyle=':')
plt.axhline(y=40,color='black',linestyle=':')
plt.axhline(y=50,color='black',linestyle=':')
plt.axhline(y=60,color='black',linestyle=':')
plt.axhline(y=70,color='black',linestyle=':')
plt.axhline(y=80,color='black',linestyle=':')
plt.axhline(y=90,color='black',linestyle=':')
plt.xticks(range(0,xx,45))
plt.ylabel('Percentage [%]')
plt.xlim([0,xx-1])
plt.legend()
plt.show()

